package org.usfirst.team3132.demo.libs;

import edu.wpi.first.wpilibj.PIDSource;
/**
 *
 * @author James Ridey
 */

public class EncoderPID implements PIDSource
{
    private AverageQueue queue;

    public EncoderPID()
    {
        queue = new AverageQueue(100);
    }
    
    public double pidGet()
    {
        return queue.getAvg();
    }   
    
    public void addValue(double encoderValue)
    {
        queue.push(encoderValue);
    }
    
    public void reset()
    {
        queue.clear();
    }
}
